<?php if (!empty($errors)): ?>
<p class="message">В ходе регистрации возникли ошибки</p>
<ul class="errors">
<?php foreach ($errors as $message): ?>
    <li><?php echo $message;  ?></li>
<?php endforeach ?>
<?php endif ?>
<form method="post" accept-charset="utf-8">
    <label for="username">Username:</label>
    <input id="username" type="text" name="username" />
    <br />
    <button type="submit">Register</button>
</form>